// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "JZBasic",
    platforms: [.iOS(.v12)],
    products: [
        // Products define the executables and libraries a package produces, making them visible to other packages.
        
        .library(
            name: "JZCore",
            targets: ["JZCore"]),
        
        .library(
            name: "JZBasic",
            targets: ["JZBasic"]),
    ],
    targets: [
        // 基础类, 依赖系统AppTrackingTransparency库
        .target(
            name: "JZCore",
            path: "Sources/JZCore",
            linkerSettings: [.linkedLibrary("AppTrackingTransparency", .when(platforms: [.iOS]))]),
        
        // UIKit
        .target(
            name: "JZBasic",
            dependencies: ["JZCore"], 
            path: "Sources/JZBasic"),
        
        .testTarget(
            name: "JZBasicTests",
            dependencies: ["JZBasic"]),
    ]
)
